<template>
  <div class="user-wrapper">
    <adminMemu></adminMemu>
    <div class="container">
      <div class="item">
        <div class="item-lf">商店名</div>
        <div class="item-rg">
          <input v-model="form.name" placeholder="请输入名称" />
        </div>
      </div>
      <div class="item">
        <div class="item-lf">地址</div>
        <div class="item-rg">
          <input v-model="form.address" placeholder="请输入地址">
        </div>
      </div>
      <div class="item">
        <div class="item-lf">负责人</div>
        <div class="item-rg">
          <input v-model="form.leader" placeholder="请输入负责人">
        </div>
      </div>
      <div class="item-button" @click="addStore">提交</div>
    </div>
  </div>
</template>

<script>
import adminService from '../../service/admin'
import adminMemu from '../admin/adminMemu'
export default {
  name: 'AddStore',
  components: {
    adminMemu
  },
  data () {
    return {
      form: {}
    }
  },
  methods: {
    // 提交
    async addStore() {
      let res = await adminService.addStore(
        this.form.name,
        this.form.address,
        this.form.leader
      )
    }
  },
  async mounted () {
  }
}
</script>

<style lang="scss" scoped>

.user-wrapper {
  width: 100%;
  height: calc(100% - 1px);
  background: #B3D4FC;
  border-top: 1px solid transparent;
  .container {
    width: 800px;
    margin: 20px auto;
    border: 1px solid #496CE4;
    padding: 20px 0px;
    overflow: hidden;
    border-radius: 5px;
    .item {
      width: 100%;
      height: 40px;
      line-height: 40px;
      display: flex;
      margin-bottom: 15px;
      .item-lf {
        width: 120px;
        text-align: right;
      }
      .item-rg {
        flex: 1;
        margin-left: 20px;
        input {
          width: 85%;
          height: 38px;
          line-height: 38px;
          padding-left: 10px;
          border-radius: 5px;
          box-sizing: border-box;
          border: 0;
          border: 1px solid #ccc;
        }
      }
    }
    .item-button {
      width: 120px;
      height: 30px;
      line-height: 30px;
      border-radius: 5px;
      background: #DDDDDD;
      border: 2px solid #ffffff;
      text-align: center;
      cursor: pointer;
      margin: 0 auto;
      margin-top: 40px;
    }
  }
}

</style>
